<script>
    if( '<?php echo CONTROLLER_NAME."/".ACTION_NAME; ?>' == 'Index/index'){
        window.location.href = $('.has-treeview:eq(0) li.nav-item:eq(0) a.nav-link').attr('href')
    }
</script>